package com.chance.cc.crawler.development.command.publish.cnr;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.cnr.CnrCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.script.cnr.CnrCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.cnr.CnrScheduleTrigger;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2020/12/18 10:28
 * @Description
 *      央广网
 **/
public class CnrPublishCrawlerJob {

    public static void main(String[] args) {

        publishCrawlerJob();
    }

    public static void publishCrawlerJob(){
        //发布采集job
        CrawlerJob crawlerJob = CnrCrawlerScheduleJob.publishCrawlerScheduleJobInfo();
        CnrScheduleTrigger.publishScheduleTriggerInfo(crawlerJob.generateCrawlerKey(), crawlerJob.generateCrawlerTriggerKey());
        CnrCrawlerScript.publishCrawlerNodeScript();

    }
}
